package cn.edu.fzu.homemaking.sso.service;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;

import cn.edu.fzu.homemaking.sso.domain.entity.CompanyUser;
import cn.edu.fzu.homemaking.sso.domain.entity.Customer;
import cn.edu.fzu.homemaking.sso.domain.entity.SysUser;
import cn.edu.fzu.homemaking.sso.domain.entity.User;
import cn.edu.fzu.homemaking.sso.domain.enums.CompanyUserTypeEnum;
import cn.edu.fzu.homemaking.sso.domain.enums.SexEnum;
import cn.edu.fzu.homemaking.sso.domain.enums.StatusEnum;
import cn.edu.fzu.homemaking.sso.domain.vo.UserStatistic;

public interface UserService {

    /** 通过邮箱查询用户 **/
    User getUserByEmail(String email, String userType);


    Map<String, String> allFace();


    void addSysUser(String email, String password, String name, SexEnum sex, Date birth, String phone, String address,
                    String faceUrl, User currentUser);


    /** 更新系统人员信息 **/
    void updateSysUser(Long id,String email, String phone, String address, String faceUrl, StatusEnum status, User currentUser);


    List<SysUser> listSysUser(String email, String name, SexEnum sex, String phone, StatusEnum status,
                              User currentUser);


    void addCustomer(String email, String password, String name, SexEnum sex, Date birth, String phone, String address,
                     String faceUrl);


    void updateCustomer(Long id,String email, String phone, String address, String faceUrl, StatusEnum status,
                        User currentUser);


    /** 批量获取顾客信息 **/
    List<Customer> listCustomer(String email, String name, SexEnum sex, String phone, StatusEnum status,
                                User currentUser);


    void addCompanyUser(String email, String password, String name, SexEnum sex, Date birth, String phone,
                        String address, String faceUrl, Long companyId, Long labelId, CompanyUserTypeEnum type,
                        BigDecimal salary);


    /** 更新公司人员信息 **/
    void updateCompanyUser(Long id,String email, String phone, String address, String faceUrl, StatusEnum status, Long labelId,
                           User currentUser);


    /** 批量获取家政人员信息 **/
    List<CompanyUser> listCompanyUser(String email, String name, SexEnum sex, String phone, StatusEnum status,
                                      Long companyId, CompanyUserTypeEnum type, Long labelId, User currentUser);


    List<CompanyUser> listAllCompanyUser(CompanyUserTypeEnum type);


    /** 更新用户信息 **/
    void updateUser(User user,String email, String password, String phone, String address, String faceUrl, StatusEnum status);


    /** 通过id查询顾客名称 **/
    String getNameById(Long id, String userType);

    /**
     * 统计顾客数量
     */
    UserStatistic countUser(User currenUser);
}
